Skip to content

Conversation

jmartinesp
Copy link
Member

@jmartinesp jmartinesp commented Sep 15, 2025

Content

  • Allows MessageSummaryFormatter to create the summary based on the event content, not the whole event. This is needed because the thread summary info only contains the content.
  • Modifies several factories to follow these changes.
  • Makes the TimelineItemEventFactory calculate the text summary from the latest event from the thread.
  • Displays the new info in a ThreadSummaryView.
  • Extracts the message bubble helper functions for shape and color to MessageBubbleDefaults so they can be reused in that previous view.
  • Also makes sure the shape is only calculated when a reecomposition that would trigger a change happens, instead of for every recomposition.

Motivation and context

Implements the Android part of the designs for element-hq/element-meta#2771.

Screenshots / GIFs

In the PR.

Tests

Enable the 'Threads' feature flag, the navigate to a room with threads. Check the info from the summary is displayed correctly.

Tested devices

  • Physical
  • Emulator
  • OS version(s): 14

Checklist

  • Changes have been tested on an Android device or Android emulator with API 24
  • UI change has been tested on both light and dark themes
  • Accessibility has been taken into account. See https://github.com/element-hq/element-x-android/blob/develop/CONTRIBUTING.md#accessibility
  • Pull request is based on the develop branch
  • Pull request title will be used in the release note, it clearly define what will change for the user
  • Pull request includes screenshots or videos if containing UI changes
  • You've made a self review of your PR

Copy link
Contributor

github-actions bot commented Sep 15, 2025

📱 Scan the QR code below to install the build (arm64 only) for this PR.
QR code
If you can't scan the QR code you can install the build via this link: https://i.diawi.com/2dztEB

Copy link

codecov bot commented Sep 15, 2025

Codecov Report

❌ Patch coverage is 73.71429% with 46 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.74%. Comparing base (0d7d33c) to head (daead53).

Files with missing lines Patch % Lines
...meline/factories/event/TimelineItemEventFactory.kt 50.00% 8 Missing and 1 partial ⚠️
...s/impl/timeline/components/TimelineItemEventRow.kt 87.09% 3 Missing and 5 partials ⚠️
...line/factories/event/TimelineItemContentFactory.kt 66.66% 7 Missing ⚠️
...aries/eventformatter/api/TimelineEventFormatter.kt 0.00% 6 Missing ⚠️
...entformatter/impl/DefaultTimelineEventFormatter.kt 0.00% 4 Missing ⚠️
...ll/test/pollcontent/FakePollContentStateFactory.kt 0.00% 3 Missing ⚠️
.../factories/event/TimelineItemContentPollFactory.kt 0.00% 2 Missing ⚠️
...s/messagesummary/DefaultMessageSummaryFormatter.kt 60.00% 0 Missing and 2 partials ⚠️
.../event/TimelineItemContentRoomMembershipFactory.kt 0.00% 1 Missing ⚠️
...factories/event/TimelineItemContentStateFactory.kt 0.00% 1 Missing ⚠️
... and 3 more
Additional details and impacted files
@@            Coverage Diff            @@
##           develop    #5355    +/-   ##
=========================================
  Coverage    79.73%   79.74%            
=========================================
  Files         2274     2277     +3     
  Lines        62867    62979   +112     
  Branches      7874     7884    +10     
=========================================
+ Hits         50130    50223    +93     
- Misses        9840     9852    +12     
- Partials      2897     2904     +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jmartinesp jmartinesp added the PR-Misc For other changes label Sep 18, 2025
@jmartinesp jmartinesp marked this pull request as ready for review September 18, 2025 11:46
@jmartinesp jmartinesp requested a review from a team as a code owner September 18, 2025 11:46
@jmartinesp jmartinesp requested review from bmarty and removed request for a team September 18, 2025 11:46
@jmartinesp jmartinesp force-pushed the feat/add-thread-decoration-with-latest-event-details branch from fcf902e to daead53 Compare September 18, 2025 11:46
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR-Misc For other changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants